package cn.com.roy.thread.t3_1_3.test4;

public class MyService {
    public void testMethod(Object lock){
        try{
           synchronized (lock){
               System.out.println("wait begin :" + Thread.currentThread().getName());
               lock.wait();
               System.out.println("wait end :" + Thread.currentThread().getName());
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
